/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * ADMIN_CONSOLE.java
 *
 * Created on Oct 3, 2010, 10:58:20 PM
 */

package COMIC_BOOK_STORE;

import java.sql.SQLException;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author Alexander
 */
public class ADMIN_CONSOLE extends javax.swing.JFrame {

    /** Creates new form ADMIN_CONSOLE */
    public ADMIN_CONSOLE() {
        super("ADMIN CONSOLE");
        initComponents();
        this.setLocationRelativeTo(null);
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">
    private void initComponents() {

        jLayeredPane1 = new javax.swing.JLayeredPane();
        staffRecordsButton = new javax.swing.JButton();
        bookRecordsButton = new javax.swing.JButton();
        customerRecordsButton = new javax.swing.JButton();
        backToMainMenuButton = new javax.swing.JButton();
        accountingRecordsButton = new javax.swing.JButton();
        jLabel1 = new javax.swing.JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setResizable(false);

        staffRecordsButton.setFont(new java.awt.Font("Tunga", 1, 18));
        staffRecordsButton.setText("Staff Records");
        staffRecordsButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                staffRecordsButtonActionPerformed(evt);
            }
        });
        staffRecordsButton.setBounds(300, 210, 200, 60);
        jLayeredPane1.add(staffRecordsButton, javax.swing.JLayeredPane.DEFAULT_LAYER);

        bookRecordsButton.setFont(new java.awt.Font("Tunga", 1, 18));
        bookRecordsButton.setText("Book Records");
        bookRecordsButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                bookRecordsButtonActionPerformed(evt);
            }
        });
        bookRecordsButton.setBounds(300, 280, 200, 60);
        jLayeredPane1.add(bookRecordsButton, javax.swing.JLayeredPane.DEFAULT_LAYER);

        customerRecordsButton.setFont(new java.awt.Font("Tunga", 1, 18));
        customerRecordsButton.setText("Member Records");
        customerRecordsButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                customerRecordsButtonActionPerformed(evt);
            }
        });
        customerRecordsButton.setBounds(300, 140, 200, 60);
        jLayeredPane1.add(customerRecordsButton, javax.swing.JLayeredPane.DEFAULT_LAYER);

        backToMainMenuButton.setFont(new java.awt.Font("Tunga", 1, 18));
        backToMainMenuButton.setText("Back to Main Menu");
        backToMainMenuButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                backToMainMenuButtonActionPerformed(evt);
            }
        });
        backToMainMenuButton.setBounds(300, 350, 200, 60);
        jLayeredPane1.add(backToMainMenuButton, javax.swing.JLayeredPane.DEFAULT_LAYER);

        accountingRecordsButton.setFont(new java.awt.Font("Tunga", 1, 18));
        accountingRecordsButton.setText("Accounting Records");
        accountingRecordsButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                accountingRecordsButtonActionPerformed(evt);
            }
        });
        accountingRecordsButton.setBounds(300, 70, 200, 60);
        jLayeredPane1.add(accountingRecordsButton, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/IMAGE_REPOSITORY/Background5 copy.jpg"))); // NOI18N
        jLabel1.setText("jLabel1");
        jLabel1.setBounds(-40, 0, 940, 500);
        jLayeredPane1.add(jLabel1, javax.swing.JLayeredPane.DEFAULT_LAYER);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jLayeredPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 900, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jLayeredPane1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 500, Short.MAX_VALUE)
        );

        pack();
    }// </editor-fold>

    private void accountingRecordsButtonActionPerformed(java.awt.event.ActionEvent evt) {                                                        
        new ACCOUNT_RECORD().setVisible(true);
        this.setVisible(false);
    }                                                       

    private void customerRecordsButtonActionPerformed(java.awt.event.ActionEvent evt) {                                                      
        try {
            new MEMBER_RECORD().setVisible(true);
        } catch (SQLException ex) {
            Logger.getLogger(ADMIN_CONSOLE.class.getName()).log(Level.SEVERE, null, ex);
        }
        this.setVisible(false);
    }                                                     

    private void bookRecordsButtonActionPerformed(java.awt.event.ActionEvent evt) {                                                  
        try {
            new BOOK_RECORD().setVisible(true);
        } catch (SQLException ex) {
            Logger.getLogger(ADMIN_CONSOLE.class.getName()).log(Level.SEVERE, null, ex);
        }
        this.setVisible(false);
    }                                                 

    private void staffRecordsButtonActionPerformed(java.awt.event.ActionEvent evt) {                                                   
        try {
            new STAFF_RECORD().setVisible(true);
        } catch (SQLException ex) {
            Logger.getLogger(ADMIN_CONSOLE.class.getName()).log(Level.SEVERE, null, ex);
        }
        this.setVisible(false);
    }                                                  

    private void backToMainMenuButtonActionPerformed(java.awt.event.ActionEvent evt) {                                                     
        new MAIN_MENU().setVisible(true);
        this.setVisible(false);
    }                                                    

    /**
    * @param args the command line arguments
    */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new ADMIN_CONSOLE().setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify
    private javax.swing.JButton accountingRecordsButton;
    private javax.swing.JButton backToMainMenuButton;
    private javax.swing.JButton bookRecordsButton;
    private javax.swing.JButton customerRecordsButton;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLayeredPane jLayeredPane1;
    private javax.swing.JButton staffRecordsButton;
    // End of variables declaration

}
